<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : artistManage.xsl
    Created on : April 1, 2013, 2:16 PM
    Author     : tiwtiger
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:s="http://xml.netbeans.org/schema/artist"
exclude-result-prefixes="s">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="/">
        <html>
            <body>
                <xsl:apply-templates/>
            </body>
        </html>
    </xsl:template>
    <xsl:template match="s:Artists">
        <table border="1" width="75%">
            <tr bgcolor="#9acd32">
                <td>Artist ID</td>
                <td>Artist Name</td>
                <td>Biology</td>
                <td>Artist Image</td>
                <td>Subscriber Number</td>
                <td>Artist Views</td>
                <td>Update</td>
                <td>Delete</td>
            </tr>
            <xsl:for-each select="s:Artist">
                <tr>
                    <td>
                        <xsl:value-of select="@ArtistID"/>
                    </td>
                    <td>
                        <xsl:value-of select="s:ArtistName"/>
                    </td>
                    <td>
                        <xsl:value-of select="s:Biology"/>
                    </td>
                    <td>
<!--                        <xsl:value-of select="s:ArtistImageSRC"/>-->
                        <img alt=""  src="/M4E/db/{s:ArtistName}/{s:ArtistImageSRC}"
                                width="80" height="80"/>
                    </td>
                    <td>
                        <xsl:value-of select="s:SubscriberNumber"/>
                    </td>
                    <td>
                        <xsl:value-of select="s:ArtistViews"/>
                    </td>
                    <td>
                        <input type="button" value="Update"/>
                    </td>
                    <td>
                        <input type="button" value="Delete"/>
                    </td>
                </tr>
            </xsl:for-each>
        </table>
    </xsl:template>

</xsl:stylesheet>
